package com.qeado.content.dao.ibatis;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.qeado.common.dao.BaseDao;
import com.qeado.content.dao.CompanyInfoDao;
import com.qeado.content.model.CompanyInfo;

@SuppressWarnings("unchecked")
@Repository
public class CompanyInfoDaoImpl extends BaseDao implements CompanyInfoDao {

	@Override
	public void deleteCompanyInfo(CompanyInfo companyInfo) {
		this.getSqlMapClientTemplate().update("deleteCompanyInfo", companyInfo);
	}

	@Override
	public CompanyInfo getCompanyLogoById(String id) {
		return (CompanyInfo)this.getSqlMapClientTemplate().queryForObject("getCompanyLogoById", id);
	}

	@Override
	public void updateCompanyInfo(CompanyInfo companyInfo) {
		this.getSqlMapClientTemplate().update("updateCompanyInfo", companyInfo);
	}

	@Override
	public void saveCompanyInfo(CompanyInfo companyInfo) {
		this.getSqlMapClientTemplate().update("saveCompanyInfo", companyInfo);
	}

	@Override
	public List<CompanyInfo> searchCompanyInfo(CompanyInfo companyInfo) {
		return this.getSqlMapClientTemplate().queryForList("searchCompanyInfo", companyInfo);
	}

	@Override
	public CompanyInfo searchCompanyInfoById(String id) {
		return (CompanyInfo)this.getSqlMapClientTemplate().queryForObject("searchCompanyInfoById", id);
	}

	@Override
	public CompanyInfo validateCompanyName(String companyName) {
		return (CompanyInfo)this.getSqlMapClientTemplate().queryForObject("validateCompanyName", companyName);
	}

	@Override
	public List<CompanyInfo> getCompanyCategoryList() {
		return this.getSqlMapClientTemplate().queryForList("getCompanyCategoryList");
	}

	@Override
	public List<CompanyInfo> getCompanyIndustryList() {
		return this.getSqlMapClientTemplate().queryForList("getCompanyIndustryList");
	}

	@Override
	public List<CompanyInfo> getCompanyIndustryCategoryList() {
		return this.getSqlMapClientTemplate().queryForList("getCompanyIndustryCategoryList");
	}

	@Override
	public List<CompanyInfo> getCompanyManagementModeList() {
		return this.getSqlMapClientTemplate().queryForList("getCompanyManagementModeList");
	}

}
